<?php

/**
 * Created by Reliese Model.
 */

namespace App\Models\Base;

use Carbon\Carbon;
use Dcat\Admin\Traits\HasDateTimeFormatter;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\SoftDeletes;

/**
 * Class WorkTicketRating
 *
 * @property int $id
 * @property int $work_ticket_id 工单id
 * @property int|null $work_user_id 维护人员id
 * @property int|null $school_user_id 学校用户id
 * @property int $score 评分|100:满意,101:一般,102:不满意
 * @property string $content 评价内容
 * @property \Illuminate\Support\Carbon|null $created_at
 * @property \Illuminate\Support\Carbon|null $updated_at
 * @property \Illuminate\Support\Carbon|null $deleted_at
 * @method static \Illuminate\Database\Eloquent\Builder|WorkTicketRating newModelQuery()
 * @method static \Illuminate\Database\Eloquent\Builder|WorkTicketRating newQuery()
 * @method static \Illuminate\Database\Eloquent\Builder|WorkTicketRating onlyTrashed()
 * @method static \Illuminate\Database\Eloquent\Builder|WorkTicketRating query()
 * @method static \Illuminate\Database\Eloquent\Builder|WorkTicketRating whereContent($value)
 * @method static \Illuminate\Database\Eloquent\Builder|WorkTicketRating whereCreatedAt($value)
 * @method static \Illuminate\Database\Eloquent\Builder|WorkTicketRating whereDeletedAt($value)
 * @method static \Illuminate\Database\Eloquent\Builder|WorkTicketRating whereId($value)
 * @method static \Illuminate\Database\Eloquent\Builder|WorkTicketRating whereSchoolUserId($value)
 * @method static \Illuminate\Database\Eloquent\Builder|WorkTicketRating whereScore($value)
 * @method static \Illuminate\Database\Eloquent\Builder|WorkTicketRating whereUpdatedAt($value)
 * @method static \Illuminate\Database\Eloquent\Builder|WorkTicketRating whereWorkTicketId($value)
 * @method static \Illuminate\Database\Eloquent\Builder|WorkTicketRating whereWorkUserId($value)
 * @method static \Illuminate\Database\Eloquent\Builder|WorkTicketRating withTrashed()
 * @method static \Illuminate\Database\Eloquent\Builder|WorkTicketRating withoutTrashed()
 * @mixin \Eloquent
 */
class WorkTicketRating extends Model
{
	use SoftDeletes;
	use HasDateTimeFormatter;
	const ID = 'id';
	const WORK_TICKET_ID = 'work_ticket_id';
	const WORK_USER_ID = 'work_user_id';
	const SCHOOL_USER_ID = 'school_user_id';
	const SCORE = 'score';
	const CONTENT = 'content';
	const CREATED_AT = 'created_at';
	const UPDATED_AT = 'updated_at';
	const DELETED_AT = 'deleted_at';
	protected $table = 'work_ticket_rating';

	protected $casts = [
		self::ID => 'int',
		self::WORK_TICKET_ID => 'int',
		self::WORK_USER_ID => 'int',
		self::SCHOOL_USER_ID => 'int',
		self::SCORE => 'int',
		self::CREATED_AT => 'datetime',
		self::UPDATED_AT => 'datetime'
	];
}
